package com.huijie.app.u.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.huijie.core.common.BaseTenantEntity;
import org.jsets.shiro.model.Account;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author echen
 * @since 2019-01-09
 */
@TableName("u_user")
public class User extends BaseTenantEntity implements Account {

    private static final long serialVersionUID = 1L;

    /**
     * 用户登录名
     */
    private String userLoginName;

    /**
     * 昵称
     */
    private String userName;

    /**
     * 密码
     */
    private String userPassword;

    /**
     * 用户状态：冻结、作废等
     */
    private Integer userStatus;


    /**
     * 用户所对应的角色id
     */
    @TableField(exist = false)
    private String roleIds;
    /**
     * 用户所对应的角色名称
     */
    @TableField(exist = false)
    private String roleNames;


    public String getUserLoginName() {
        return userLoginName;
    }

    public void setUserLoginName(String userLoginName) {
        this.userLoginName = userLoginName;
    }
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }
    public Integer getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }

    @Override
    public String toString() {
        return "User{" +
        "userLoginName=" + userLoginName +
        ", userName=" + userName +
        ", userPassword=" + userPassword +
        ", userStatus=" + userStatus +
        "}";
    }

    @Override
    public String getAccount() {
        return userLoginName;
    }

    @Override
    public String getPassword() {
        return userPassword;
    }

    public String getRoleIds() {
        return roleIds;
    }

    @Override
    public void setRoleIds(String roleIds) {
        this.roleIds = roleIds;
    }

    public String getRoleNames() {
        return roleNames;
    }

    @Override
    public void setRoleNames(String roleNames) {
        this.roleNames = roleNames;
    }

}
